<?php
$_doc = array();
$_doc['title'] = L('tab_category_allocate_userlist');
?>
<include file="pAdmin:header" />
<table class="tabmenu" cellspacing="0">
    <tbody>
        <tr>
            <td class="wedge">&nbsp;</td>
            <td class="wmenu"><a href="__URL__/index">{%tab_category_list}</a></td>
            <td class="wmenu"><a href="__URL__/add">{%tab_category_add}</a></td>
            <td class="wmenu here"><a href="__URL__/allocate"><span>{%tab_category_allocate}</span></a></td>
            <td>&nbsp;</td>
        </tr>
    </tbody>
</table>
<div class="main">
    <p class="editpage finder">
    {%page_title_allocate_selectuser}
    </p>
    <ul class="fnc">
        <li><button type="button" class="btn" onclick="next()">{%action_next}</button></li>
    </ul>
    <form method="get" action="__URL__">
        <input type="hidden" name="a">
        <table class="data" id="gridInst">
            <thead>
                <tr>
                    <th class="cbCell"><input type="checkbox" id="effectAll" /></th>
                    <th>{%column_account}</th>
                    <th>{%column_realname}</th>
                </tr>
            </thead>
            <tbody class="grid">
                <iterate name="users" id="vo">
                    <tr>
                        <td><input type="checkbox" name="id[]" value="{$vo['id']}"/></td>
                        <td>{$vo['account']}</td>
                        <td>{$vo['realname']}</td>
                    </tr>
                </iterate>
            </tbody>
        </table>
    </form>
    <ul class="fnc">
        <li><button type="button" class="btn" onclick="next()">{%action_next}</button></li>
    </ul>
    <script type="text/javascript">
	    function next(){
	    	checkedInfo=(app.get('gridInst')).getChecked();
            if(checkedInfo.count==0){
                alert(top.Lang['js_base_pls_select_record']);
                return;
            }
            var arrs=checkedInfo.value.split(',');
            window.location='__URL__/allocate/&step=2&id='+arrs[0];
	    }
    </script>
</div>
<include file="pAdmin:footer" />